filename orion url 'https://webpages.uidaho.edu/~renaes/Data/orion.csv'; options mprint; data orion; infile orion dlm=',' firstobs=2; input customer_id$ order_month sale_amt; run; * (obs=10) will allow us to see jus the first 10 observations; proc print data=orion (obs=10); run; %let month=1; %macro printing; proc print data=orion; title 'January Orders'; where order_month=&month; var customer_id sale_amt; format sale_amt dollar6.; run; proc means data=orion; var sale_amt; where order_month=&month; run; title; %mend printing; %printing * not required in Lab but here is a way with a second %LET varaible for the name of the month and another for the DATA= option; %let month=1; %let month_name=January; %let name=orion; %macro printing; proc print data=&name; title "&month_name Orders"; var sale_amt; where order_month=&month; format sale_amt dollar6.; run; proc means data=&name; var Sale_amt; where order_month=&month; run; title; %mend printing; %printing %macro molarmass; data mmm; set &chemdata; mm=sum(a*w); ; proc means data=mmm sum noprint; var mm; output out=mmsum sum=; run; title "Molar mass for &molecule"; proc print data=mmsum; var mm; run; title; %mend; data co2; input a w; cards; 1 12.0107 2 15.999 ; run; %let chemdata=co2; %let molecule=CarbonDioxide(CO2); %molarmass data ch4; input a w; cards; 1 12.0107 4 1.00784 ; run; %let chemdata=ch4; %let molecule=Methane(CH4); %molarmass data c6h12o6; input a w; cards; 6 12.0107 12 1.00784 6 15.999 ; run; %let chemdata=c6h12o6; %let molecule=Glucose(C6H12O6); %molarmass data so2; input a w; cards; 1 32.065 2 15.999 ; run; %let chemdata=so2; %let molecule=SulfurDioxide(SO2); %molarmass data nano3; input a w; cards; 1 22.989769 1 14.0067 3 15.999 ; run; %let chemdata=nano3; %let molecule=SodiumNitrate(NaNO3); %molarmass data nacl; input a w; cards; 1 22.989769 1 35.453 ; run; %let chemdata=nacl; %let molecule=TableSalt(NaCl); %molarmass data fe2o3; input a w; cards; 2 55.845 3 15.999 ; run; %let chemdata=fe2o3; %let molecule=IronOxide(Fe2O3); %molarmass data uf6; input a w; cards; 1 238.02891 6 18.998403 ; run; %let chemdata=uf6; %let molecule=UraniumHexaflouride(UF6); %molarmass